package cn.edu.ctbu.studentstest.dao;

import cn.edu.ctbu.studentstest.domain.Students;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import javax.persistence.GeneratedValue;
import java.util.List;

/**
 *学生仓库接口
 */
public interface StudentRepository extends JpaRepository<Students,Long> {
    /**
     * 输入姓名进行查询
     */

    @Query("from  tb_student  o where o.name like %:name% ")
    List<Students> findByStudentName(@Param("name") String name);



}
